package br.com.processo.bean;

import java.io.Serializable;

import javax.enterprise.context.SessionScoped;
import javax.faces.context.FacesContext;
import javax.inject.Named;
import javax.servlet.http.HttpSession;

import br.com.processo.util.Constantes;

@Named
@SessionScoped
public class MenuBean implements Serializable {

	private static final long serialVersionUID = -1870740736553577144L;
	
	public String logout() {
		FacesContext facesContext = FacesContext.getCurrentInstance();
		HttpSession session = (HttpSession) facesContext .getExternalContext().getSession(false);
		session.invalidate();
		return Constantes.LOGIN_PAGE + Constantes.REDIRECT_TRUE;
	}

}
